package goodroommate.domain;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class Comment {

	private int commentid;
	private long commentator;
	private String commentatorusername;
	private long reply;
	private String replyusername;
	private int postingid;
	private String content;
	private Timestamp time;
	
	
	public int getCommentid() {
		return commentid;
	}
	public void setCommentid(int commentid) {
		this.commentid = commentid;
	}
	public long getCommentator() {
		return commentator;
	}
	public void setCommentator(long commentator) {
		this.commentator = commentator;
	}
	public long getReply() {
		return reply;
	}
	
	public String getCommentatorusername() {
		return commentatorusername;
	}
	public void setCommentatorusername(String commentatorusername) {
		this.commentatorusername = commentatorusername;
	}
	public String getReplyusername() {
		return replyusername;
	}
	public void setReplyusername(String replyusername) {
		this.replyusername = replyusername;
	}
	public void setReply(long reply) {
		this.reply = reply;
	}
	public int getPostingid() {
		return postingid;
	}
	public void setPostingid(int postingid) {
		this.postingid = postingid;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Timestamp getTime() {
		return time;
	}
	public void setTime(Timestamp time) {
		this.time = time;
	}
	public String getTimeFormatted() {
		if (this.time == null) return "";
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		return df.format(this.time);
	}
	
}
